import matplotlib.pyplot as plt
import numpy as np

xy = np.array([1., 1.]).reshape((-1, 1))
theta = 30 / 180 * np.pi
c, s = np.cos(theta), np.sin(theta)

R = np.array([
    [c, -s],
    [s, c],
], dtype=np.float32)

xy2 = np.dot(R, xy)
fig, ax = plt.subplots(1, 1)

# https://stackoverflow.com/questions/7965743/how-can-i-set-the-aspect-ratio-in-matplotlib
plt.gca().set_aspect('equal')

plt.scatter(xy[0][0], xy[1][0], c='blue')
plt.scatter(xy2[0][0], xy2[1][0], c='red')

# https://stackoverflow.com/questions/25689238/show-origin-axis-x-y-in-matplotlib-plot
ax.axhline(y=0, color='k')
ax.axvline(x=0, color='k')

plt.ylim(-1, 3)
plt.xlim(-1, 3)
plt.show()
